﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1

{
    class Program
    {
        static void Main(string[] args)
        {
            // double[] arr = new double[5]; 
            //for (int i = 0; i < arr.Length; i++)
            //{   Console.WriteLine("请输入数据");
            //     arr[i] = double.Parse(Console.ReadLine());
            // }
            //double sum = 0;
            //double max = arr[0];
            //double min = arr[0];
            //double avg = 0;
            //kuaidi kuan =  kuaidi.已发货;
            //shuiguo();
            //jineng();
            //Program program = new Program();
            //program.Ref(arr, ref sum, ref max, ref min, ref avg);
            //program.Out(arr, out sum, out max, out min, out avg);
            //Console.WriteLine("{0},{1},{2},{3}", sum, max, min, avg);
            //test();
            //ArrayUtil.heise();
            //StringUtil.heise();





        }
        public static void test() {
            Class1 class1 = new Class1();
            class1.Name =  "大师兄";
            class1.Name1 = "二师兄";
            class1.Name2 = "三师弟";
            class1.Name3 = "坐骑龙";
            class1.Name4 = "唐僧";
            class1.text1();

        }
        public void Ref(double[] arr, ref double sum, ref double max, ref double min, ref double avg)
        {
            
            for (int i = 0; i < arr.Length; i++)
            {  sum += arr[i];
               if (min > arr[i])
                { 
                    min = arr[i];
                }
                if (max < arr[i])
                {
                    max = arr[i];
                }    

            }
            avg = sum / arr.Length;
        }
        public void Out(double[] arr, out double sum, out double max, out double min, out double avg)
        {    sum = 0;
             max = arr[0];
             min = arr[0];
             avg = 0;

            for (int i = 0; i < arr.Length; i++)
            {
                sum += arr[i];
                if (min > arr[i])
                {
                    min = arr[i];
                }
                if (max < arr[i])
                {
                    max = arr[i];
                }

            }
            avg = sum / arr.Length;
        }


        enum kuaidi
        {

            新订单,
            已发货,
            已签收,
            已评价
        }
        public enum Fruit
        {
            香蕉 = 10, 苹果 = 20, 西瓜 = 50, 草莓 = 2, 葡萄 = 1, 哈密瓜 = 30, 奇异果 = 5
        }
        public enum rpg
        {
            战士, 法师, 精灵
        }
        static void jineng()
        {
            Console.WriteLine("请输入职业");
            string shui = Console.ReadLine();
            rpg fruit = (rpg)Enum.Parse(typeof(rpg), shui);
            switch (fruit)
            {
                case rpg.战士:
                    Console.WriteLine("战士的技能：碎石打击、烈焰锚钩、战斗咆哮");
                    break;
                case rpg.法师:
                    Console.WriteLine("法师的技能：巨浪冲击、元素突击、复仇杀戮");
                    break;
                case rpg.精灵:
                    Console.WriteLine("精灵的技能：减速陷阱、能量浪潮、旋风剑舞");
                    break;
                default:
                    break;
            }
        }
        static void shuiguo()
        {
            Console.WriteLine("请输入水果");
            string shui = Console.ReadLine();
            Fruit fruit = (Fruit)Enum.Parse(typeof(Fruit), shui);

            switch (fruit)
            {
                case Fruit.哈密瓜:
                    Console.WriteLine((int)Fruit.哈密瓜);
                    break;
                case Fruit.香蕉:
                    Console.WriteLine((int)Fruit.香蕉);
                    break;
                case Fruit.苹果:
                    Console.WriteLine((int)Fruit.苹果);
                    break;
                case Fruit.西瓜:
                    Console.WriteLine((int)Fruit.西瓜);
                    break;
                case Fruit.草莓:
                    Console.WriteLine((int)Fruit.草莓);
                    break;
                case Fruit.葡萄:
                    Console.WriteLine((int)Fruit.葡萄);
                    break;
                case Fruit.奇异果:
                    Console.WriteLine((int)Fruit.奇异果);
                    break;



            }


        }
    }
}
